<?php
/* @var $headTitle Zend_View_Helper_HeadTitle */
$headTitle = $this->getHelper('HeadTitle');

// kolejność renderowania widoku.. z actionStack jest wcześniej niż z akcji z której jest stack (?!)
count($this->urlParams('fromSite'))
	? $headTitle->prepend($this->row['name'])
	: $headTitle->append($this->row['name']);

/* @var $headMeta Zend_View_Helper_HeadMeta */
$headMeta = $this->getHelper('HeadMeta');

!strlen($this->row['meta_keywords']) or $headMeta->setName('keywords', $this->row['meta_keywords']);
!strlen($this->row['meta_description']) or $headMeta->setName('description', $this->row['meta_description']);

$time_create = strtotime($this->row['time_create']);

$content = $this->row['description'];

/* @var $headScript Zend_View_Helper_HeadScript */
$headScript = $this->getHelper('HeadScript');
$headScript->offsetSetFile('mootools-1.2.3','js/mootools/mootools-1.2.3-core-yc.js');
$headScript->offsetSetFile('jshorizont','js/promotor/gallery/jshorizont/jshorizont.js');

/* @var $headLink Zend_View_Helper_HeadLink */
$headLink = $this->getHelper('HeadLink');
$headLink->offsetSetStylesheet('jshorizont','js/promotor/gallery/jshorizont/jshorizont.css');
?>
<div class="kx_gallery_album kx_display">
	<div class="kx_head">
		<div class="kx_info">
			<h3 class="kx_title"><?php print $this->row['name']?></h3>
		</div>

		<div class="kx_time">
			<em class="kx_day"><?php print date('d', $time_create)?></em>
			<em class="kx_month"><?php print $this->translate(strtolower(date('F', $time_create)))?></em>
			<em class="kx_year"><?php print date('Y', $time_create)?></em>
		</div>

		<?php if (count($site = $this->urlParams('fromSite'))):?>
			<a class="kx_back" href="<?php print $this->url(array('alias'=>$site['alias']),'site',true)?>">&laquo; powrót do strony <em><?php print $this->escape($site['name'])?></em></a>
		<?php else:?>
			<a class="kx_back" href="<?php print $this->url(array('action' => 'index','controller'=>'gallery','module'=>'gallery'),'default',true);?>">&laquo; powrót do spisu galerii</a>
		<?php endif;?>
	</div>

	<div class="kx_body">
		<div class="kx_gallery_images">
			<div class="kx_wrapper">
				<ul class="kx_actions">
					<li class="kx_action kx_action_prev"><em>&laquo;</em> <span>Poprzednia</span></li>
					<li class="kx_action kx_action_next"><span>Następna</span> <em>&raquo;</em></li>
				</ul>
				<ul class="kx_list">
					<?php foreach ((array)$this->rowset as $row):?>
					<li class="kx_item">
						<a rel="libghtbox" href=""><em><?php print $row['name']?></em></a>
					</li>
					<?php endforeach;?>
				</ul>
			</div>
		</div>

		<div class="kx_gallery_image kx_display">
		&nbsp;
		</div>
	</div>
</div>